package com.smart.community.work.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 保洁任务视图对象
 * 
 * 严格按照《Java后端SpringBoot代码开发规范_重构版.md》VO规范实现：
 * - 使用@Data注解：自动生成getter/setter方法
 * - 完整注释：所有字段都有完整的JavaDoc注释
 * - 序列化支持：使用@JsonFormat注解格式化时间字段
 * - 字段命名：使用驼峰命名法
 * - 类型安全：使用具体的类型而不是Object
 * - 与数据库表结构完全对应
 * 
 * @author Wu.Liang
 * @since 2025-01-30
 * @version 2.0.0 - 根据数据库表结构重构
 */
@Data
@Schema(description = "保洁任务视图对象")
public class CleaningTaskVO {

    @Schema(description = "任务ID")
    private Long id;

    @Schema(description = "区域ID")
    private Long areaId;

    @Schema(description = "区域名称")
    private String areaName;

    @Schema(description = "任务名称")
    private String taskName;

    @Schema(description = "任务类型：routine-常规，temporary-临时，special-特殊")
    private String taskType;

    @Schema(description = "计划日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate scheduledDate;

    @Schema(description = "计划时间")
    @JsonFormat(pattern = "HH:mm")
    private LocalTime scheduledTime;

    @Schema(description = "分配用户ID")
    private Long assignedUserId;

    @Schema(description = "分配用户姓名")
    private String assignedUserName;

    @Schema(description = "分配用户真实姓名")
    private String assignedRealName;

    @Schema(description = "优先级：1-低，2-中，3-高，4-紧急")
    private Integer priority;

    @Schema(description = "状态：1-待分配，2-已分配，3-进行中，4-已完成，5-已取消")
    private Integer status;

    @Schema(description = "状态描述")
    private String statusDesc;

    @Schema(description = "任务描述")
    private String description;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "更新人ID")
    private Long updateBy;

    @Schema(description = "版本号")
    private Integer version;

    @Schema(description = "删除标志：0-未删除，1-已删除")
    private Integer deleted;

    @Schema(description = "物业公司ID")
    private Long propertyCompanyId;

    @Schema(description = "物业公司名称")
    private String propertyCompanyName;
}
